<?php

require_once 'common/conn.php';
if (isset($_GET['lastID'])) {
    $lastID = $_GET['lastID'];
} else {
    $lastID = 0;
}
if (isset($_GET['count'])) {
    $count = $_GET['count'];
}
$data = array();
if (is_numeric($lastID) && is_numeric($count)) {
    $db = new DBC();
    $sql = "SELECT productid,flashcode,age,name,url,imageURL,version,size,type1,type2,type3,downloadtimes FROM t_product WHERE status = 1 AND productid > " . $lastID . " ORDER BY productid LIMIT 0," . $count;
    $data = $db->fetchData($sql);
}
echo json_encode($data);
?>